package com.example.demo.leetcode.jianzhi;

/**
 * @author xujimou
 * @version 2.0
 * @Description
 * @date 2021/7/22 11:19
 */
public class Arr_调整奇数 {

    public int[] exchange(int[] nums) {

        for(int i = 0; i<nums.length;i++){
            for(int j=i;j<nums.length-1;j++){
                if(nums[j] % 2 ==0){
                    int temp = nums[j+1];
                    nums[j+1] = nums[j];
                    nums[j] =temp;
                }
            }
        }
        return nums;

    }

}
